<?php
/*
 **************************************************************************************************
 *	The template for displaying content
 **************************************************************************************************
*/
?>

<!-- post content area -->
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
	<div class="row">
		<div class="span8">
			<div class="post-image">
				<!-- post title -->
				<div class="post-heading">
					<h3>
						<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
					</h3>
				</div>
				<!-- post thumbnail ( featured images ) -->
				<?php if ( has_post_thumbnail() && ! post_password_required() ) : ?>
					<div class="entry-thumbnail">
						<?php the_post_thumbnail(); ?>
					</div>
				<?php endif; ?>
			</div>
			<!-- post meta -->
			<div class="meta-post">
				<ul>
					<?php prototype_entry_meta(); ?>
					<?php edit_post_link( __( 'Edit', TEXTDOMAIN ), '<li><i class="icon-pencil"></i> ', '</li>' ); ?>
				</ul>
			</div>

			<?php if ( is_search() ) : ?><!-- only display excerpts for search -->
				<div class="post-entry">
					<p>
					<?php the_excerpt(); ?>
					</p>
				</div>
			<?php else : ?>
				<!-- post content -->
				<div class="post-entry">
					<p>
					<?php the_content( __( 'Continue Reading <span>&rarr;</span>', '' ) ); ?>
					<?php
						if ( function_exists( 'wp_pagenavi' ) ) :
							wp_pagenavi( array( 'type' => 'multipart' ) ); // pagenavi plugin
						else :
							// page-links for paginated posts ( <!--nextpage--> quicktag one or more times )
							wp_link_pages( array(
								'before'		=> '<div class="page-links"><span class="page-links-title">' . __( 'Pages: ', TEXTDOMAIN ) . '</span>',
								'after'			=> '</div>',
								'link_before'	=> '<span>',
								'link_after'	=> '</span>'
							) );
						endif;
					?>
					</p>
				</div>
			<?php endif; ?>
			<!-- comment link -->
			<div class="meta-comment meta-post">
				<?php
					if ( comments_open() && ! is_single() ) :
						if ( post_password_required() ) :
							echo '<ul> ';
						else :
							echo '<ul><i class="icon-comment-alt"></i> ';
						endif;
						comments_popup_link(
							'<li>' . __( 'Leave a comment', TEXTDOMAIN ) . '</li>',
							'<li>' . __( '1 Comment', TEXTDOMAIN ) . '</li>',
							'<li>' . __( '% Comments', TEXTDOMAIN ) . '</li>'
						);
						echo '</ul>';
					endif;
				?>
				</ul>
			</div>
		</div>
	</div>
</article>

<!-- author info area -->
<?php
	if ( is_single() && get_the_author_meta( 'description' ) && is_multi_author() ) :
		get_template_part( 'author-bio' ); // load author-bio
	endif;
?>